package routers

import (
	lessoncontroller "gin-project-01/gin-step04/gin17-mutli-tables/controllers/lesson"
	"gin-project-01/gin-step04/gin17-mutli-tables/middlewares"
	"github.com/gin-gonic/gin"
)

func LessonRouters(r *gin.Engine) {
	//路由分组中间件使用方式二
	routers := r.Group("/lesson")
	routers.Use(middlewares.SaveAccessLog)
	{

		routers.GET("/list/:all", lessoncontroller.LessonController{}.List)

		routers.GET("/get/:id", lessoncontroller.LessonController{}.Get)

		routers.GET("/exc", lessoncontroller.LessonController{}.Exclude)

		routers.GET("/stuDesc", lessoncontroller.LessonController{}.StuDesc)

	}
}
